﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Kinect;
using Microsoft.Samples.Kinect.KinectExplorer;
using Microsoft.Samples.Kinect.WpfViewers;
using KinectExplorer;

namespace ZeroTouchUI
{
    /// <summary>
    /// Interaction logic for GR1.xaml
    /// </summary>
    public partial class GR1 : UserControl
    {
        private KinectSensor kinect;

        public GR1()
        {
            InitializeComponent();
        }

        public KinectSensor Kinect
        {
            get
            {
                return this.kinect;
            }

            set
            {
                this.kinect = value;
                this.colorViewer.Kinect = this.kinect;
                this.KinectSkeletonViewerOnColor.Kinect = this.kinect;
            }
        }

        private void resetButton_Click(object sender, RoutedEventArgs e)
        {
            //Reset Kinect when tracking goes terribly wrong.
            KinectSensor temp = this.Kinect;
            this.Kinect = null;
            this.Kinect = temp;
        }
    }
}
